<?php
include dirname(dirname(dirname(__FILE__))).'/admin-verify.php';
require dirname(dirname(__FILE__)).'/functions.php';
$_goodsName=addslashes($_GET["goodsName"]);
$row=getGoodsInfoByName($_goodsName);
$res="";

if (deletePhoto($row['pid'])) {
	if(unlink(dirname(dirname(dirname(dirname(__FILE__))))."/images/".$row['store_name'])){
		
		if (deleteGoods($row['id'])) {
			
			$res="success";
		}else {
			$res="商品信息删除失败";
			
		}
		
	}else {
		$res="图片存储删除失败";
		
	}
	
	
}else {
	
	$res="图片记录删除失败";
	
}

echo $res;

?>